import { defineStore } from 'pinia'
import type { Standard } from '@/types/StandardType'

interface State {
  standard: Standard
}

export const useStandardstore = defineStore('standard', {
  state: (): State => {
    return {
      standard: {
        id: -1,
        category: '',
        type: '',
        name: '',
        file_uuid: '',
        parameterList: [],
        sample: {
          informationFile: '',
          photo: '',
          followStandard: true
        },
        sop: {
          file: '',
          followStandard: true
        },
        simulation: {
          report: '',
          origin: '',
          followStandard: true
        }
      }
    }
  },
  persist: true
})
